Skip to content

Fix timezone info for Ogmios backend #176

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 23, 2023
Merged

Fix timezone info for Ogmios backend #176

merged 2 commits into from
Mar 23, 2023

Conversation

juliusfrost
Copy link
Contributor

In the latest build, Ogmios gives timezone information in the return string. For example, 2022-10-25T00:00:00Z

@cffls
Copy link
Collaborator

cffls commented Mar 15, 2023

Thank you for the fix! Looks like the unit test failed. To make it work again with any version of ogmios, maybe we can try the new parsing template first, and if parsing has failed, try removing %z from the template and parsing again. What do you think?

@juliusfrost
Copy link
Contributor Author

@cffls I changed it to use datetime instead, to make it more cohesive and it should handle both cases now.

@codecov-commenter
Copy link

codecov-commenter commented Mar 23, 2023

Codecov Report

Merging #176 (cb181da) into main (ab01bec) will decrease coverage by 0.93%.
The diff coverage is 100.00%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##             main     #176      +/-   ##
==========================================
- Coverage   86.38%   85.45%   -0.93%     
==========================================
  Files          26       26              
  Lines        2761     2833      +72     
  Branches      654      679      +25     
==========================================
+ Hits         2385     2421      +36     
- Misses        284      302      +18     
- Partials       92      110      +18     
Impacted Files Coverage Δ
pycardano/backend/ogmios.py 55.39% <100.00%> (+0.21%) ⬆️

... and 8 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Collaborator

@cffls cffls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you @juliusfrost !

@cffls cffls merged commit 9485ce5 into Python-Cardano:main Mar 23, 2023
@cffls cffls added the bug fix Fixes a bug label Mar 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug fix Fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants